Notes:
SH.csv dataset under congressional session 107 and so is omitted.We will be using three data sets
dyad.data: dyadic level data which is time-dyad level data, with variables for node index for senators (node1) and bills (node2) the edge value drawn between senator and bill nodes (Y), and the time period (here always 1, as we focus on the 107th congressional session only).
senate: monadic level data measured at the senator-time level, with a variable indicating the node index for senators (node1) which directly corresponds with the unique node index for senators in dyad.data. The same is true for the time variable. Monadic covariates include seniority, ideol1, ideol2, party, and sex.
bills: monadic level data measured at the bills-time level, with a variable indicating the node index for senators (node2) which directly corresponds with the unique node index for bills in dyad.data. The same is true for the time variable. Monadic covariates include private, Major and Major2 (and Major3 for alternative variable for classification of bill), as well as covariates on the sponsor of the bill (billsponsor_seniority, billsponsor_ideol1, billsponsor_ideol2, billsponsor_party, billsponsor_sex).
Monadic covariates for Senators
seniority: seniority of the senatorsideol1: ideology dim 1ideol2: ideology dim 2party : party labelsex : sex of senatorMonadic covariates for Bills
Major2: crude categories of type of bill, where
billsponsor_seniority: seniority of the senator who sponsored the billbillsponsor_ideol1: ideology dim 1 of the senator who sponsored the billbillsponsor_ideol2: ideology dim 2 of the senator who sponsored the billbillsponsor_party : party label of the senator who sponsored the billbillsponsor_sex : sex of senator who sponsored the billprivate because only 5 ones, otherwise all zeros)Dyadic covariates:
reciprocity_prop: for a given senator-bill dyad, whether the senator (i) sponsored bills in the previous session that the sponsor of this current bill cosponsored, over total sponsored bills by senator (i) in previous session.Find k1 and k2 values such that the AUC is maximized for a small subsample. Here we use 10% for training and 10% for testing.
dyad.data$tid<-dyad.data$time
senate$tid<-senate$time
bills$tid<-bills$time
#set.seed(123): 3, 4
#set.seed(1234): 4, 3 (though very close to 3, 3)
set.seed(12345) #3,4
sample_split_index<-sample(1:node2,node2,replace=FALSE) #sample split based on Family 2
train.data.dyad<- dyad.data[which(dyad.data$node2%in%sample_split_index[1:round(node2*0.1)]),]
test.data.dyad<- dyad.data[which(dyad.data$node2%in%sample_split_index[(round(node2*0.1)+1):round(node2*0.2)]),]
train.data.monad1 <- senate
train.data.monad2 <- bills[which(bills$node2%in%sample_split_index[1:round(node2*0.1)]),]
test.data.monad2 <- bills[which(bills$node2%in%sample_split_index[(round(node2*0.1)+1):round(node2*0.2)]),]
mychoiceK<-chooseK(formula.dyad = Y ~ reciprocity_prop0 + lreciprocity_prop,
formula.monad1 = ~ seniority + ideol1 + ideol2 + as.factor(party) + sex, #
formula.monad2 = ~ as.factor(Major2) + billsponsor_seniority + billsponsor_ideol1 + billsponsor_ideol2 +
billsponsor_party + billsponsor_sex,
senderID = "node1",
receiverID = "node2",
nodeID1 = "node1",
nodeID2 = "node2",
timeID = "tid",
train.data.dyad = train.data.dyad,
test.data.dyad = test.data.dyad,
train.data.monad1 = train.data.monad1,
test.data.monad1 = NULL,
train.data.monad2 = train.data.monad2,
test.data.monad2 = test.data.monad2,
k1=c(2,3,4),
k2=c(2,3,4),
n.hmmstates= 1,
mmsbm.control = list(spectral = TRUE,
hessian = TRUE,
verbose=TRUE,
vi_iter = 500,
conv_tol = 1e-6,
bipartite = TRUE
#,batch_size1 = .80, batch_size2 = .80
)
)
#nodes2 = nrow(train.data.monad2),
#npred2 = 1+5+5,#+1 for intercept
#mychoiceK$bestk: 3, 4
saveRDS(mychoiceK,file="cosponsor_data/mychoiceK-107.rds")
k1=3/k2=3 and k1=3/k2=4 are the combinations with the highest out of sample AUCs consistently (the latter slightly higher), but we lean to 3/3 based on eyeballing mixed membership probabilities in the bills groups (sorting suggests 3 groups with a little noise).
K1=3,K2=4
Time difference of 11.3141 minutes.
We can look at summaries of the returned information.
For instance, what is the probability of edges being drawn between the two sets of latent groups? Note we denote the latent groups of first class of nodes (senators) by G, and the latent groups of second class of nodes (bills) by H.
Blockmodel
| Bills Group 1 | Bills Group 2 | Bills Group 3 | Bills Group 4 | |
|---|---|---|---|---|
| Senate Group 1 | -0.783 | -1.313 | -1.271 | -1.082 |
| Senate Group 2 | -0.899 | -1.328 | -2.052 | -1.087 |
| Senate Group 3 | -0.574 | -1.102 | -0.862 | -0.654 |
Senators (G) in all three latent groups are more likely to form edges with Bills (H) in latent group 1, and all are less likely to form edges with Bills (H) in group 2 and 3. Bills in group H3 are most likely to form edges with Senators in G1 and G3, and slightly less with Senators in G2.
How are senators clustering in the latent group space?
Senator Latent Group Plots
Senators latent groups 1- 3 are mostly composed of Democrat senators (group 1 more likely from the South, than group 3), while Group 2 leans more heavily Republican. Latent group memberships are well sorted into the three corners of the ternary plot.
What are the senators with highest membership in each latent group?
Top 10 members of senator latent groups, by probas
| Names | Group 1 | Names | Group 2 | Names | Group 3 |
|---|---|---|---|---|---|
| Hollings, Ernest F. [SC] | 1.0000000 | Smith, Bob [NH] | 1 | Feingold, Russell D. [WI] | 1.0000000 |
| Conrad, Kent [ND] | 1.0000000 | Gramm, Phil [TX] | 1 | Corzine, Jon [NJ] | 0.9999983 |
| Breaux, John B. [LA] | 1.0000000 | Allard, A. Wayne [CO] | 1 | Schumer, Charles E. [NY] | 0.9999982 |
| Byrd, Robert C. [WV] | 1.0000000 | Inhofe, Jim [OK] | 1 | Kohl, Herb [WI] | 0.9999973 |
| Nelson, Bill [FL] | 0.9999520 | Kyl, Jon [AZ] | 1 | Kennedy, Edward M. [MA] | 0.9999959 |
| Reid, Harry M. [NV] | 0.9998393 | Enzi, Michael B. [WY] | 1 | Wellstone, Paul D. [MN] | 0.9999938 |
| Nelson, E. Benjamin [NE] | 0.9997188 | Thomas, Craig [WY] | 1 | Wyden, Ron [OR] | 0.9999887 |
| Akaka, Daniel K. [HI] | 0.9992290 | Bunning, Jim [KY] | 1 | Boxer, Barbara [CA] | 0.9999885 |
| Cleland, Max [GA] | 0.9977763 | Roberts, Pat [KS] | 1 | Harkin, Tom [IA] | 0.9999791 |
| Baucus, Max [MT] | 0.9964224 | Brownback, Sam [KS] | 1 | Durbin, Richard J. [IL] | 0.9999779 |
How are bills clustering in the latent group space? 4 Latent groups]{color=“red”}
What are the top bills?
| Names | Group 1 | Names | Group 2 | Names | Group 3 | Names | Group 4 |
|---|---|---|---|---|---|---|---|
| SC_107_27 | 1.0000000 | SN_107_1264 | 1 | SN_107_2900 | 1 | SN_107_1749 | 0.8202084 |
| SC_107_60 | 1.0000000 | SN_107_296 | 1 | SN_107_663 | 1 | SN_107_625 | 0.8201645 |
| SC_107_62 | 1.0000000 | SN_107_1037 | 1 | SN_107_719 | 1 | SN_107_1284 | 0.8201581 |
| SC_107_91 | 1.0000000 | SN_107_2509 | 1 | SN_107_2874 | 1 | SN_107_2444 | 0.8201417 |
| SE_107_107 | 1.0000000 | SN_107_409 | 1 | SN_107_177 | 1 | SN_107_1618 | 0.8201415 |
| SE_107_27 | 1.0000000 | SN_107_1023 | 1 | SN_107_1821 | 1 | SN_107_1452 | 0.8201324 |
| SE_107_67 | 1.0000000 | SN_107_1108 | 1 | SN_107_1822 | 1 | SN_107_1424 | 0.8201320 |
| SE_107_81 | 1.0000000 | SN_107_1289 | 1 | SN_107_3070 | 1 | SN_107_955 | 0.8201318 |
| SJ_107_27 | 1.0000000 | SN_107_457 | 1 | SN_107_995 | 1 | SN_107_2707 | 0.8201310 |
| SE_107_16 | 1.0000000 | SN_107_666 | 1 | SN_107_2227 | 1 | SN_107_2619 | 0.8201283 |
| SE_107_159 | 1.0000000 | SN_107_1096 | 1 | SN_107_1184 | 1 | SN_107_1313 | 0.8201281 |
| SE_107_242 | 1.0000000 | SN_107_1159 | 1 | SN_107_126 | 1 | SN_107_2435 | 0.8201279 |
| SE_107_305 | 1.0000000 | SN_107_1367 | 1 | SN_107_1476 | 1 | SN_107_938 | 0.7930760 |
| SC_107_79 | 1.0000000 | SN_107_1570 | 1 | SN_107_1906 | 1 | SN_107_928 | 0.7930760 |
| SJ_107_1 | 1.0000000 | SN_107_1633 | 1 | SN_107_3077 | 1 | SN_107_1888 | 0.7453612 |
| SE_107_278 | 0.9999999 | SN_107_1793 | 1 | SN_107_871 | 1 | SN_107_2459 | 0.6354020 |
| SE_107_212 | 0.9999999 | SN_107_1833 | 1 | SN_107_2594 | 1 | SN_107_1435 | 0.6354020 |
| SE_107_127 | 0.9999999 | SN_107_1918 | 1 | SN_107_737 | 1 | SN_107_2826 | 0.6280744 |
| SE_107_111 | 0.9999999 | SN_107_1948 | 1 | SN_107_2219 | 1 | SN_107_1074 | 0.6280651 |
| SE_107_54 | 0.9999999 | SN_107_203 | 1 | SN_107_1422 | 1 | SN_107_1615 | 0.6280650 |
Group 1 Latent group characterized by small number of bills with high probability in group – but high likelihood of edge formation with all senate latent groups. Bills that have the highest probability of being in this group are sponsored by Republicans, and are more likely to be resolutions (concurrent/joint as well).The types of bills most likely to be in this group are ones that are about expressing views on domestic, international norms. They are also likely to have (~3 - ~ 50 large range) numbers of cosponsors .
Group 2 Latent group characterized by moderate number of bills with high probability in group – and moderate likelihood of edge formation with all senate latent groups, though most probas with Senate Group 3 . Bills that have the highest probability of being in this group are sponsored by Republicans, and are more likely to be bills. The types of bills most likely to be in this group are ones that are about programs and policies around defense/military, healthcare, education. They are also likely to have (~5 low) numbers of cosponsors .
Group 3 Latent group characterized by a large number of bills with, in decreasing order, likelihood of forming edges with Senate Latent groups 3, 1 ,2. Bills that have the highest probability of being in this group are sponsored by Democrats, and are more likely to be Senate bills. The types of bills most likely to be in this group are ones that are about federal benefits (bureaucratic/admin), and federal recognition of individuals. They are also likely to have (~10) numbers of cosponsors .
Group 4 Latent group characterized by a small number of bills with, in decreasing order, likelihood of forming edges with Senate Latent groups 3 and then 1/2. Bills that have the highest probability of being in this group are more likely to be sponsored by Democrats, and are more likely to be Senate bills. The types of bills most likely to be in this group are ones that are about interactions and sharing of info between federal and state bodies/jurisdiction, minority services (elderly, women, immigrants, fostercare, LGBTQ+, prisoners). They are also likely to have (~1 - ~60 wide range of) numbers of cosponsors .
We use a sponsor-cosponsor reciprocity variable lreciprocity_prop as a dyadic predictor. The variable takes the number of times the senator (node 1) has sponsored a bill that was cosponsored by (node 2) in the previous session 106 over a denominator of the total number of times the senator (node 1) sponsored bills in the previous session.
Below is the adjacency matrix for reciprocity between row Senators of Congress 107 and column Senators of Congress 106 (only showing senators who appear in 106 and also appear in 107 for columns).
## $`Number of Dyads`
## [1] 260667
##
## $`Number of Family 1 Blocks`
## [1] 3
##
## $`Number of Family 2 Blocks`
## [1] 4
##
## $`Percent of Observations in Each Family 1 Block`
## [1] 0.1929879 0.4882301 0.3187820
##
## $`Percent of Observations in Each Family 2 Block`
## [1] 0.12367328 0.32143593 0.53964635 0.01524444
##
## $`Blockmodel Matrix`
## 2 Group 1 2 Group 2 2 Group 3 2 Group 4
## 1 Group 1 0.3136908 0.2119949 0.2190264 0.2531063
## 1 Group 2 0.2892706 0.2094544 0.1138120 0.2521582
## 1 Group 3 0.3603659 0.2493418 0.2969526 0.3420536
##
## $`Monadic Coefficients 1`
## Coefficient Std. Error
## State 1:Group 1:(Intercept) 3.48080754 0.2662936
## State 1:Group 1:seniority -0.32082822 0.2673116
## State 1:Group 1:ideol1 -3.63842525 0.1269672
## State 1:Group 1:ideol2 5.02569885 0.2103412
## State 1:Group 1:as.factor(party)Republican -4.49335631 1.8091435
## State 1:Group 1:sexm -0.07192295 0.2641697
## State 1:Group 2:(Intercept) 3.17099212 0.2769437
## State 1:Group 2:seniority -0.09168354 0.2674153
## State 1:Group 2:ideol1 5.07928414 0.3959664
## State 1:Group 2:ideol2 -1.68298965 0.2942919
## State 1:Group 2:as.factor(party)Republican 5.11627080 0.3100601
## State 1:Group 2:sexm 0.96748880 0.2992943
## State 1:Group 3:(Intercept) 5.98478986 0.2690930
## State 1:Group 3:seniority -0.49814800 0.2673999
## State 1:Group 3:ideol1 -6.70440973 0.3177652
## State 1:Group 3:ideol2 -4.29114956 0.2641714
## State 1:Group 3:as.factor(party)Republican -4.81558029 0.2597006
## State 1:Group 3:sexm -0.02697216 0.2733973
##
## $`Monadic Coefficients 2`
## Coefficient Std. Error
## State 1:Group 1:(Intercept) 2.40634966 0.5418330
## State 1:Group 1:as.factor(Major2)2 -0.74895453 0.5418331
## State 1:Group 1:as.factor(Major2)3 -0.50907622 0.5418330
## State 1:Group 1:as.factor(Major2)4 -0.19530935 0.5418330
## State 1:Group 1:as.factor(Major2)5 -2.56295207 0.5418330
## State 1:Group 1:as.factor(Major2)6 3.27781979 0.5418330
## State 1:Group 1:billsponsor_seniority 1.47542244 0.5418330
## State 1:Group 1:billsponsor_ideol1 3.15813926 0.5418330
## State 1:Group 1:billsponsor_ideol2 -0.58063225 0.5418330
## State 1:Group 1:billsponsor_partyRepublican -0.01898823 0.5418330
## State 1:Group 1:billsponsor_sexm 2.75972227 0.5418330
## State 1:Group 2:(Intercept) 2.73009640 0.5418345
## State 1:Group 2:as.factor(Major2)2 1.07809466 0.5418839
## State 1:Group 2:as.factor(Major2)3 2.04898458 0.5418286
## State 1:Group 2:as.factor(Major2)4 2.50487491 0.5418428
## State 1:Group 2:as.factor(Major2)5 -0.09062970 0.5418225
## State 1:Group 2:as.factor(Major2)6 -2.49397220 0.5417938
## State 1:Group 2:billsponsor_seniority -0.58385016 0.5418332
## State 1:Group 2:billsponsor_ideol1 2.77935167 0.5418287
## State 1:Group 2:billsponsor_ideol2 -2.27678097 0.5418333
## State 1:Group 2:billsponsor_partyRepublican 5.26841155 0.5419296
## State 1:Group 2:billsponsor_sexm -1.04661109 0.5419965
## State 1:Group 3:(Intercept) 4.25133886 0.5424837
## State 1:Group 3:as.factor(Major2)2 -0.60657671 0.5306854
## State 1:Group 3:as.factor(Major2)3 -1.16715218 0.5359726
## State 1:Group 3:as.factor(Major2)4 -0.56106233 0.5289789
## State 1:Group 3:as.factor(Major2)5 1.38550673 0.5217550
## State 1:Group 3:as.factor(Major2)6 -1.39809375 0.5398111
## State 1:Group 3:billsponsor_seniority -1.82960576 0.5418404
## State 1:Group 3:billsponsor_ideol1 -5.21240989 0.5146284
## State 1:Group 3:billsponsor_ideol2 2.16317656 0.5029399
## State 1:Group 3:billsponsor_partyRepublican -5.05111140 0.1941512
## State 1:Group 3:billsponsor_sexm 0.11868135 0.5397218
## State 1:Group 4:(Intercept) -2.79533771 0.5418330
## State 1:Group 4:as.factor(Major2)2 3.56563033 0.5418330
## State 1:Group 4:as.factor(Major2)3 0.78237238 0.5418330
## State 1:Group 4:as.factor(Major2)4 0.75675523 0.5418330
## State 1:Group 4:as.factor(Major2)5 -0.34320880 0.5418330
## State 1:Group 4:as.factor(Major2)6 -2.98544995 0.5418329
## State 1:Group 4:billsponsor_seniority 0.57056888 0.5418330
## State 1:Group 4:billsponsor_ideol1 1.34533064 0.5418330
## State 1:Group 4:billsponsor_ideol2 -2.36428622 0.5418330
## State 1:Group 4:billsponsor_partyRepublican 0.81863805 0.5418330
## State 1:Group 4:billsponsor_sexm 2.78064145 0.5418330
##
## $`Dyadic Coefficients`
## Coefficient Std. Error
## reciprocity_prop0 -1.4927880 0.07213633
## lreciprocity_prop 0.3938973 0.07023693
## Coefficient Std. Error
## reciprocity_prop0 -1.4927880 0.07213633
## lreciprocity_prop 0.3938973 0.07023693
The estimated coefficient on lreciprocity_prop is 0.394. When facing a bill today, a senator who has had a sponsorship history with the senator-sponsor is more likely to cosponsor today’s bill. (conditional on having any non-zero sponsorship history). The coefficient estimated on the binary variable for reciprocity_prop0 (if not zero then 1, if zero then 0) is -1.493.
We might be interested in seeing how monadic predictors at the senator level are distributed for each of the groups:
Senator Monadic Predictors
| Senate Group 1 | Senate Group 2 | Senate Group 3 | |
|---|---|---|---|
| Intercept | 3.481 | 3.171 | 5.985 |
| Seniority | -0.321 | -0.092 | -0.498 |
| Ideol1 | -3.638 | 5.079 | -6.704 |
| Ideol2 | 5.026 | -1.683 | -4.291 |
| Republican | -4.493 | 5.116 | -4.816 |
| Male | -0.072 | 0.967 | -0.027 |
Senators in groups 1 and 3 are more likely to score negatively on ideol1, be Democrats, and be slightly less senior, with group 3 as more extreme than group 1. Senators with higher membership probabilities in group 2 are more likely to score positively on ideol1 and be Republican and male.
Senator: Ideology, Dimension 1
Senator: Ideology, Dimension 2
Senator: Seniority
Senator: Party
Senator: Sex
Bills Monadic Predictors
| Bills Group 1 | Bills Group 2 | Bills Group 3 | Bills Group 4 | |
|---|---|---|---|---|
| Intercept | 2.406 | 2.730 | 4.251 | -2.795 |
| Major2:2 | -0.749 | 1.078 | -0.607 | 3.566 |
| Major2:3 | -0.509 | 2.049 | -1.167 | 0.782 |
| Major2:4 | -0.195 | 2.505 | -0.561 | 0.757 |
| Major2:5 | -2.563 | -0.091 | 1.386 | -0.343 |
| Major2:6 | 3.278 | -2.494 | -1.398 | -2.985 |
| Sponsor Seniority | 1.475 | -0.584 | -1.830 | 0.571 |
| Sponsor Ideol1 | 3.158 | 2.779 | -5.212 | 1.345 |
| Sponsor Ideol2 | -0.581 | -2.277 | 2.163 | -2.364 |
| Sponsor Republican | -0.019 | 5.268 | -5.051 | 0.819 |
| Male | 2.760 | -1.047 | 0.119 | 2.781 |
Group 1: Latent group characterized by small number of bills with high probability in group – but high likelihood of edge formation with all senate latent groups. Bills that have the highest probability of being in this group are sponsored by Republicans, and are more likely to be resolutions (concurrent/joint as well).The types of bills most likely to be in this group are ones that are about expressing views on domestic, international norms (Other category in Major2 variable). They are also likely to have (~3 - ~ 50 large range) numbers of cosponsors .
Group 2: Latent group characterized by moderate number of bills with high probability in group – and moderate likelihood of edge formation with all senate latent groups, though most probas with Senate Group 3 . Bills that have the highest probability of being in this group are sponsored by Republicans, and are more likely to be bills. The types of bills most likely to be in this group are ones that are about programs and policies around defense/military, healthcare, education. They are also likely to have (~5 low) numbers of cosponsors .
Group 3: Latent group characterized by a large number of bills with, in decreasing order, likelihood of forming edges with Senate Latent groups 3, 1 ,2. Bills that have the highest probability of being in this group are sponsored by Democrats, and are more likely to be Senate bills. The types of bills most likely to be in this group are ones that are about federal benefits (bureaucratic/admin), and federal recognition of individuals (Cateogry 5 in Major2). They are also likely to have (~10) numbers of cosponsors .
Group 4: Latent group characterized by a small number of bills with, in decreasing order, likelihood of forming edges with Senate Latent groups 3 and then 1/2. Bills that have the highest probability of being in this group are more likely to be sponsored by Democrats, and are more likely to be Senate bills. The types of bills most likely to be in this group are ones that are about interactions and sharing of info between federal and state bodies/jurisdiction, minority services (elderly, women, immigrants, fostercare, LGBTQ+, prisoners). They are also likely to have (~1 - ~60 wide range of) numbers of cosponsors .
Bills: Major Category classification
Major2: crude categories of type of bill, where
covGroupB(fm=model107,cov="as.factor(Major2)",family=2, groupassign="expected")
Bills: Sponsor Ideology, Dimension 1
Bills: Sponsor Ideology, Dimension 2
Bills: Sponsor Party
covGroupB(fm=model107, cov="billsponsor_party", family=2, groupassign="expected")
–>
Degree distribution of full bipartite
| group 1 | group 2 | group 3 |
|---|---|---|
| 1.57 | 3.73 | 2.55 |
| group 1 | group 2 | group 3 | group 4 |
|---|---|---|---|
| 28.89 | 61.78 | 113.42 | 2.51 |
Bipartite graph visualization:
Bipartite sociomatrix visualization:
Bipartite graph: Splitting bills by sponsoring party
Democrat sponsored bill
Republican sponsored bill
note data.108: for orig
We will be using three data sets
dyad.data: dyadic level data which is time-dyad level data, with variables for node index for senators (node1) and bills (node2) the edge value drawn between senator and bill nodes (Y), and the time period (here always 1, as we focus on the 107th congressional session only).
senate: monadic level data measured at the senator-time level, with a variable indicating the node index for senators (node1) which directly corresponds with the unique node index for senators in dyad.data. The same is true for the time variable. Monadic covariates include seniority, ideol1, ideol2, party, and sex.
bills: monadic level data measured at the bills-time level, with a variable indicating the node index for senators (node2) which directly corresponds with the unique node index for bills in dyad.data. The same is true for the time variable. Monadic covariates include private, Major and Major2 (and Major3 for alternative variable for classification of bill), as well as covariates on the sponsor of the bill (billsponsor_seniority, billsponsor_ideol1, billsponsor_ideol2, billsponsor_party, billsponsor_sex).
Monadic covariates for Senators
seniority: seniority of the senatorsideol1: ideology dim 1ideol2: ideology dim 2party : party labelsex : sex of senatorMonadic covariates for Bills
Major2: crude categories of type of bill, where
billsponsor_seniority: seniority of the senator who sponsored the billbillsponsor_ideol1: ideology dim 1 of the senator who sponsored the billbillsponsor_ideol2: ideology dim 2 of the senator who sponsored the billbillsponsor_party : party label of the senator who sponsored the billbillsponsor_sex : sex of senator who sponsored the billprivate because only 5 ones, otherwise all zeros)Dyadic covariates:
reciprocity: for a given senator-bill dyad, whether the senator sponsored bills in the previous session that the sponsor of this current bill cosponsored.Find k1 and k2 values such that the AUC is maximized for a small subsample.
dyad.data$tid<-dyad.data$time
senate$tid<-senate$time
bills$tid<-bills$time
set.seed(123)
sample_split_index<-sample(1:node2,node2,replace=FALSE) #sample split based on Family 2
train.data.dyad<- dyad.data[which(dyad.data$node2%in%sample_split_index[1:round(node2*0.1)]),]
test.data.dyad<- dyad.data[which(dyad.data$node2%in%sample_split_index[(round(node2*0.1)+1):round(node2*0.2)]),]
train.data.monad1 <- senate
train.data.monad2 <- bills[which(bills$node2%in%sample_split_index[1:round(node2*0.1)]),]
test.data.monad2 <- bills[which(bills$node2%in%sample_split_index[(round(node2*0.1)+1):round(node2*0.2)]),]
set.seed(123)
mychoiceK<-chooseK(formula.dyad = Y ~ reciprocity_prop0 + lreciprocity_prop,
formula.monad1 = ~ seniority + ideol1 + ideol2 + as.factor(party) + sex, #
formula.monad2 = ~ as.factor(Major2) + billsponsor_seniority + billsponsor_ideol1 + billsponsor_ideol2 +
billsponsor_party + billsponsor_sex,
senderID = "node1",
receiverID = "node2",
nodeID1 = "node1",
nodeID2 = "node2",
timeID = "time",
train.data.dyad = train.data.dyad,
test.data.dyad = test.data.dyad,
train.data.monad1 = train.data.monad1,
test.data.monad1 = NULL,
train.data.monad2 = train.data.monad2,
test.data.monad2 = test.data.monad2,
k1=c(2,3,4),
k2=c(2,3,4),
n.hmmstates= 1,
mmsbm.control = list(seed=123, spectral = TRUE,
hessian = TRUE,
verbose=TRUE,
vi_iter = 1000,
conv_tol = 1e-6,
bipartite = TRUE
))
#mychoiceK$bestk: 3 4
saveRDS(mychoiceK,file="cosponsor_data/mychoiceK-108.rds")
3, 4 is the combination with the highest AUC.
K1=3, K2=4
20 min.
We can look at summaries of the returned information.
For instance, what is the probability of edges being drawn between the two sets of latent groups? Note we denote the latent groups of first class of nodes (senators) by G, and the latent groups of second class of nodes (bills) by H.
Blockmodel
| Bills Group 1 | Bills Group 2 | Bills Group 3 | Bills Group 4 | |
|---|---|---|---|---|
| Senate Group 1 | -2.247 | -2.576 | -2.548 | -1.963 |
| Senate Group 2 | -1.726 | -1.227 | -1.664 | -1.509 |
| Senate Group 3 | -2.232 | -2.374 | -2.632 | -1.910 |
Senators (G) in all three latent groups are more likely to form edges with Bills (H) in latent group 4, and all are less likely to form edges with Bills (H) in group 3.
Senators in G Group 2 are most likely to form edges across all bills latent groups, though have a higher probability of forming an edge with Bill H latent groups 2 and 3. Senators in groups G1 and G3 on the other hand are more likely to form edges with Bill H latent groups 1 and 4, than with Bill H latent groups 2 and 3.
How are senators clustering in the latent group space? We will visualize via ternary plots as we have estimated a model with 2 latent groups on the senator side.
Senator Latent Group Plots
Senators latent groups 1- 3 are mostly composed of Republican senators (group 1 with more members and some mixed in Democrats, while Group 3 a smaller group of nearly all Republicans), while Group 2 is Democrats. Latent group memberships are well sorted into the three corners of the ternary plot.
Top 10 members of senator latent groups, by probas
| Names | Group 1 | Names | Group 2 | Names | Group 3 |
|---|---|---|---|---|---|
| Shelby, Richard C. [AL] | 1 | Mikulski, Barbara A. [MD] | 1.0000000 | Fitzgerald, Peter [IL] | 0.9999821 |
| Crapo, Michael D. [ID] | 1 | Stabenow, Debbie [MI] | 1.0000000 | Voinovich, George V. [OH] | 0.9999717 |
| Enzi, Michael B. [WY] | 1 | Boxer, Barbara [CA] | 1.0000000 | Chafee, Lincoln D. [RI] | 0.9999049 |
| Chambliss, Saxby [GA] | 1 | Clinton, Hillary Rodham [NY] | 1.0000000 | Gregg, Judd [NH] | 0.9995190 |
| Burns, Conrad R. [MT] | 1 | Murray, Patty [WA] | 0.9999999 | Specter, Arlen [PA] | 0.9988623 |
| Sessions, Jeff [AL] | 1 | Feinstein, Dianne [CA] | 0.9999999 | McCain, John [AZ] | 0.9853722 |
| Lott, Trent [MS] | 1 | Sarbanes, Paul S. [MD] | 0.9999998 | Collins, Susan M. [ME] | 0.9821832 |
| Nickles, Don [OK] | 1 | Cantwell, Maria [WA] | 0.9999996 | Snowe, Olympia J. [ME] | 0.9724266 |
| Talent, Jim [MO] | 1 | Levin, Carl [MI] | 0.9999986 | Stevens, Ted [AK] | 0.9283986 |
| Inhofe, Jim [OK] | 1 | Reed, John F. [RI] | 0.9999986 | Lugar, Richard G. [IN] | 0.4809963 |
How are bills clustering in the latent group space?
What are the top bills?
| Names | Group 1 | Names | Group 2 | Names | Group 3 | Names | Group 4 | |
|---|---|---|---|---|---|---|---|---|
| SN_108_1205 | SN_108_1205 | 1 | SN_108_2808 | 1.0000000 | SN_108_1754 | 1.0000000 | SC_108_114 | 1 |
| SN_108_628 | SN_108_628 | 1 | SN_108_66 | 0.9999999 | SN_108_2840 | 1.0000000 | SJ_108_25 | 1 |
| SN_108_931 | SN_108_931 | 1 | SN_108_663 | 0.9999999 | SN_108_1073 | 1.0000000 | SC_108_103 | 1 |
| SN_108_1015 | SN_108_1015 | 1 | SN_108_70 | 0.9999999 | SN_108_2635 | 1.0000000 | SE_108_112 | 1 |
| SN_108_1225 | SN_108_1225 | 1 | SN_108_1783 | 0.9999999 | SN_108_812 | 1.0000000 | SE_108_185 | 1 |
| SN_108_1248 | SN_108_1248 | 1 | SN_108_498 | 0.9999999 | SN_108_704 | 1.0000000 | SE_108_220 | 1 |
| SN_108_15 | SN_108_15 | 1 | SN_108_592 | 0.9999999 | SN_108_1166 | 1.0000000 | SE_108_242 | 1 |
| SN_108_1504 | SN_108_1504 | 1 | SN_108_2568 | 0.9999997 | SN_108_1612 | 1.0000000 | SE_108_337 | 1 |
| SN_108_1515 | SN_108_1515 | 1 | SN_108_2619 | 0.9999996 | SN_108_2845 | 1.0000000 | SE_108_338 | 1 |
| SN_108_1875 | SN_108_1875 | 1 | SN_108_2738 | 0.9999996 | SN_108_838 | 1.0000000 | SE_108_390 | 1 |
| SN_108_1929 | SN_108_1929 | 1 | SN_108_1923 | 0.9999996 | SN_108_1245 | 1.0000000 | SE_108_455 | 1 |
| SN_108_1940 | SN_108_1940 | 1 | SN_108_1145 | 0.9999996 | SN_108_1357 | 0.9999999 | SE_108_468 | 1 |
| SN_108_2061 | SN_108_2061 | 1 | SN_108_1369 | 0.9999996 | SN_108_2674 | 0.9999999 | SE_108_71 | 1 |
| SN_108_2207 | SN_108_2207 | 1 | SN_108_2322 | 0.9999996 | SN_108_949 | 0.9999999 | SE_108_35 | 1 |
| SN_108_2283 | SN_108_2283 | 1 | SN_108_589 | 0.9999996 | SN_108_2956 | 0.9999999 | SJ_108_29 | 1 |
| SN_108_2493 | SN_108_2493 | 1 | SN_108_678 | 0.9999996 | SN_108_3002 | 0.9999999 | SC_108_89 | 1 |
| SN_108_2651 | SN_108_2651 | 1 | SN_108_319 | 0.9999994 | SN_108_1250 | 0.9999999 | SE_108_166 | 1 |
| SN_108_2710 | SN_108_2710 | 1 | SN_108_819 | 0.9999994 | SN_108_2982 | 0.9999998 | SE_108_171 | 1 |
| SN_108_2877 | SN_108_2877 | 1 | SN_108_2081 | 0.9999993 | SN_108_2450 | 0.9999998 | SE_108_378 | 1 |
| SN_108_2940 | SN_108_2940 | 1 | SN_108_2612 | 0.9999993 | SN_108_2196 | 0.9999998 | SE_108_413 | 1 |
Bill specific information: (http://jhfowler.ucsd.edu/cosponsorship.htm)
Group 1 Latent group characterized by a large number of bills with high probability in group – but low likelihood of edge formation with senate latent groups 1 and 3, and slightly higher edge formation likelihood with senators in G latent group 2. Bills that have the highest probability of being in this group are sponsored by Republicans, and are more likely to be Senate bills.The types of bills most likely to be in this group are ones that are about health services, schools. They are also likely to have (~0 -10 range) numbers of cosponsors .
Group 2 Latent group characterized by a smaller number of bills with high probability in group – but low likelihood of edge formation with senate latent groups 1 and 3, and much higher edge formation likelihood with senators in G latent group 2. Bills that have the highest probability of being in this group are sponsored by Democrats, and are more likely to be Senate bills. The types of bills most likely to be in this group are ones that are about commemorations/celebrations, government (public works, pay sched, funding for DEA, federal health benefits). They are also likely to have (~0-70 wide range) numbers of cosponsors .
Group 3 Latent group characterized by a smaller number of bills with high probability in group – but low likelihood of edge formation with senate latent groups 1 and 3, and much higher edge formation likelihood with senators in G latent group 2. Bills that have the highest probability of being in this group are sponsored by Republicans, and are more likely to be Senate bills. The types of bills most likely to be in this group are ones that are about armed services/forces, security, giving jurisdiction to federal agencies. They are also likely to have (~0-10 medium range) numbers of cosponsors .
Group 4 Latent group characterized by a larger number of bills with high probability in group – but lower likelihood of edge formation with senate latent groups 1 and 3, and much higher edge formation likelihood with senators in G latent group 2. Bills that have the highest probability of being in this group are sponsored by Republicans, and are more likely to be Senate resolutions of different types. The types of resolutions most likely to be in this group are ones that are about norms (performative and otherwise). They are also likely to have (0-10 range ) numbers of cosponsors .
We use a sponsor-cosponsor reciprocity variable lreciprocity_prop as a dyadic predictor. The variable takes the number of times the senator (node 1) has sponsored a bill that was cosponsored by (node 2) in the previous session 107 over a denominator of the total number of times the senator (node 1) sponsored bills in the previous session.
Below is the adjacency matrix for reciprocity between row Senators of Congress 108 and column Senators of Congress 107 (only showing senators who appear in 107 and also appear in 108 for columns).
## $`Number of Dyads`
## [1] 367884
##
## $`Number of Family 1 Blocks`
## [1] 3
##
## $`Number of Family 2 Blocks`
## [1] 4
##
## $`Percent of Observations in Each Family 1 Block`
## [1] 0.4934401 0.4019611 0.1045988
##
## $`Percent of Observations in Each Family 2 Block`
## [1] 0.3875515 0.1642387 0.0670654 0.3811444
##
## $`Blockmodel Matrix`
## 2 Group 1 2 Group 2 2 Group 3 2 Group 4
## 1 Group 1 0.09557259 0.07067136 0.07254344 0.1231705
## 1 Group 2 0.15105173 0.22678174 0.15920565 0.1811063
## 1 Group 3 0.09687505 0.08517229 0.06708569 0.1289729
##
## $`Monadic Coefficients 1`
## Coefficient Std. Error
## State 1:Group 1:(Intercept) 7.7236066 0.3920627
## State 1:Group 1:seniority -0.5293196 0.3914606
## State 1:Group 1:ideol1 3.7870669 0.4646549
## State 1:Group 1:ideol2 5.9474042 0.3934785
## State 1:Group 1:as.factor(party)Independent -0.9735740 0.3945799
## State 1:Group 1:as.factor(party)Republican 2.5808921 0.3952737
## State 1:Group 1:sexm 2.1094867 0.3946485
## State 1:Group 2:(Intercept) 3.3844594 0.3936318
## State 1:Group 2:seniority 0.2507057 0.3914932
## State 1:Group 2:ideol1 -5.8120219 0.6714526
## State 1:Group 2:ideol2 -3.7299887 0.3995444
## State 1:Group 2:as.factor(party)Independent -0.5368524 0.3863172
## State 1:Group 2:as.factor(party)Republican -4.2767497 0.3939836
## State 1:Group 2:sexm -1.2710521 0.4056372
## State 1:Group 3:(Intercept) 0.3495208 0.3952176
## State 1:Group 3:seniority 0.1593637 0.3914376
## State 1:Group 3:ideol1 -0.1101136 0.3752517
## State 1:Group 3:ideol2 -6.6417319 0.3662060
## State 1:Group 3:as.factor(party)Independent 0.0426474 0.1029513
## State 1:Group 3:as.factor(party)Republican 1.2179314 0.4138883
## State 1:Group 3:sexm -0.1055889 0.3897526
##
## $`Monadic Coefficients 2`
## Coefficient Std. Error
## State 1:Group 1:(Intercept) 5.85698598 3.02562911
## State 1:Group 1:as.factor(Major2)2 0.92888536 3.02562911
## State 1:Group 1:as.factor(Major2)3 4.00670848 3.02562911
## State 1:Group 1:as.factor(Major2)4 -4.05939559 3.02562911
## State 1:Group 1:as.factor(Major2)5 0.01825117 3.02562911
## State 1:Group 1:as.factor(Major2)6 -4.34632875 3.02562911
## State 1:Group 1:billsponsor_seniority 1.67727788 3.02562911
## State 1:Group 1:billsponsor_ideol1 0.67000786 3.02562911
## State 1:Group 1:billsponsor_ideol2 -1.53707661 3.02562911
## State 1:Group 1:as.factor(billsponsor_party)Independent -0.70202420 3.02532716
## State 1:Group 1:as.factor(billsponsor_party)Republican 2.39468270 3.02562911
## State 1:Group 1:billsponsor_sexm 0.99476943 3.02562911
## State 1:Group 2:(Intercept) 1.28121238 3.02562911
## State 1:Group 2:as.factor(Major2)2 2.81664175 3.02562911
## State 1:Group 2:as.factor(Major2)3 0.17922038 3.02562911
## State 1:Group 2:as.factor(Major2)4 0.53080101 3.02562911
## State 1:Group 2:as.factor(Major2)5 2.78826796 3.02562911
## State 1:Group 2:as.factor(Major2)6 -2.47210002 3.02562911
## State 1:Group 2:billsponsor_seniority 1.45735587 3.02562911
## State 1:Group 2:billsponsor_ideol1 -3.89375926 3.02562911
## State 1:Group 2:billsponsor_ideol2 0.65988493 3.02562911
## State 1:Group 2:as.factor(billsponsor_party)Independent -0.46520049 3.01549498
## State 1:Group 2:as.factor(billsponsor_party)Republican -4.20009290 3.02562911
## State 1:Group 2:billsponsor_sexm -0.71991762 3.02562911
## State 1:Group 3:(Intercept) -4.52086697 3.02558997
## State 1:Group 3:as.factor(Major2)2 1.15963773 3.02637837
## State 1:Group 3:as.factor(Major2)3 -3.63449759 3.67890773
## State 1:Group 3:as.factor(Major2)4 4.87977648 3.02561946
## State 1:Group 3:as.factor(Major2)5 0.91785544 3.02773726
## State 1:Group 3:as.factor(Major2)6 -0.55041891 3.15584037
## State 1:Group 3:billsponsor_seniority -0.11393602 3.02561110
## State 1:Group 3:billsponsor_ideol1 -2.35615085 3.02350451
## State 1:Group 3:billsponsor_ideol2 0.83678798 3.02440932
## State 1:Group 3:as.factor(billsponsor_party)Independent 0.86640275 0.02820261
## State 1:Group 3:as.factor(billsponsor_party)Republican -2.38041877 2.99886189
## State 1:Group 3:billsponsor_sexm -1.06344217 3.02387668
## State 1:Group 4:(Intercept) 7.13695543 3.02562070
## State 1:Group 4:as.factor(Major2)2 -2.81948174 3.02475195
## State 1:Group 4:as.factor(Major2)3 -3.78060977 3.02557457
## State 1:Group 4:as.factor(Major2)4 -4.39935119 3.03576933
## State 1:Group 4:as.factor(Major2)5 -0.63191450 3.01905838
## State 1:Group 4:as.factor(Major2)6 0.45881720 3.02538150
## State 1:Group 4:billsponsor_seniority -2.80019696 3.02562522
## State 1:Group 4:billsponsor_ideol1 0.79944765 3.02558008
## State 1:Group 4:billsponsor_ideol2 0.94504004 3.02528709
## State 1:Group 4:as.factor(billsponsor_party)Independent 0.10372312 3.02396728
## State 1:Group 4:as.factor(billsponsor_party)Republican -0.87877402 3.02496875
## State 1:Group 4:billsponsor_sexm -0.66912226 3.02493318
##
## $`Dyadic Coefficients`
## Coefficient Std. Error
## reciprocity_prop0 -1.031325 0.04990659
## lreciprocity_prop 0.328739 0.04807509
## Coefficient Std. Error
## reciprocity_prop0 -1.031325 0.04990659
## lreciprocity_prop 0.328739 0.04807509
The estimated coefficient on lreciprocity_prop is 0.329. When facing a bill today, a senator who has had a sponsorship history with the senator-sponsor is more likely to cosponsor today’s bill. (conditional on having any non-zero sponsorship history). The coefficient estimated on the binary variable for reciprocity_prop0 (if not zero then 1, if zero then 0) is -1.031.
We might be interested in seeing how monadic predictors at the senator level are distributed for each of the groups:
Senator Monadic Predictors
| Senate Group 1 | Senate Group 2 | Senate Group 3 | |
|---|---|---|---|
| Intercept | 7.724 | 3.384 | 0.350 |
| Seniority | -0.529 | 0.251 | 0.159 |
| Ideol1 | 3.787 | -5.812 | -0.110 |
| Ideol2 | 5.947 | -3.730 | -6.642 |
| Independent | -0.974 | -0.537 | 0.043 |
| Republican | 2.581 | -4.277 | 1.218 |
| Male | 2.109 | -1.271 | -0.106 |
Senators in groups 1 and 3 are more likely to score positively (or closer to 0) on ideol1, be Republicans, with group 1 as more extreme than group 3. Senators with higher membership probabilities in group 2 are more likely to score negatively on ideol1 and be Democrat and female.
Senator: Ideology, Dimension 1
Senator: Ideology, Dimension 2
Senator: Seniority
Senator: Party
Senator: Sex
Bills Monadic Predictors
| Bills Group 1 | Bills Group 2 | Bills Group 3 | Bills Group 4 | |
|---|---|---|---|---|
| Intercept | 5.857 | 1.281 | -4.521 | 7.137 |
| Major2:2 | 0.929 | 2.817 | 1.160 | -2.819 |
| Major2:3 | 4.007 | 0.179 | -3.634 | -3.781 |
| Major2:4 | -4.059 | 0.531 | 4.880 | -4.399 |
| Major2:5 | 0.018 | 2.788 | 0.918 | -0.632 |
| Major2:6 | -4.346 | -2.472 | -0.550 | 0.459 |
| Sponsor Seniority | 1.677 | 1.457 | -0.114 | -2.800 |
| Sponsor Ideol1 | 0.670 | -3.894 | -2.356 | 0.799 |
| Sponsor Ideol2 | -1.537 | 0.660 | 0.837 | 0.945 |
| Sponsor Independent | -0.702 | -0.465 | 0.866 | 0.104 |
| Sponsor Republican | 2.395 | -4.200 | -2.380 | -0.879 |
| Male | 0.995 | -0.720 | -1.063 | -0.669 |
Group 1: Latent group characterized by a large number of bills with high probability in group – but low likelihood of edge formation with senate latent groups 1 and 3, and slightly higher edge formation likelihood with senators in G latent group 2. Bills that have the highest probability of being in this group are sponsored by Republicans, and are more likely to be Senate bills.The types of bills most likely to be in this group are ones that are about health services, schools. They are also likely to have (~0 -10 range) numbers of cosponsors . Group 2: Latent group characterized by a smaller number of bills with high probability in group – but low likelihood of edge formation with senate latent groups 1 and 3, and much higher edge formation likelihood with senators in G latent group 2. Bills that have the highest probability of being in this group are sponsored by Democrats, and are more likely to be Senate bills. The types of bills most likely to be in this group are ones that are about commemorations/celebrations, government (public works, pay sched, funding for DEA, federal health benefits). They are also likely to have (~0-70 wide range) numbers of cosponsors . Group 3: Latent group characterized by a smaller number of bills with high probability in group – but low likelihood of edge formation with senate latent groups 1 and 3, and much higher edge formation likelihood with senators in G latent group 2. Bills that have the highest probability of being in this group are sponsored by Republicans, and are more likely to be Senate bills. The types of bills most likely to be in this group are ones that are about armed services/forces, security, giving jurisdiction to federal agencies. They are also likely to have (~0-10 medium range) numbers of cosponsors . Group 4: Latent group characterized by a larger number of bills with high probability in group – but lower likelihood of edge formation with senate latent groups 1 and 3, and much higher edge formation likelihood with senators in G latent group 2. Bills that have the highest probability of being in this group are sponsored by Republicans, and are more likely to be Senate resolutions of different types. The types of resolutions most likely to be in this group are ones that are about norms (performative and otherwise). They are also likely to have (0-10 range ) numbers of cosponsors .
Bills: Major Category classification
Major2: crude categories of type of bill, where
Bills: Sponsor Ideology, Dimension 1
Bills: Sponsor Ideology, Dimension 2
Bills: Sponsor Party
We use a sponsor-cosponsor reciprocity variable lreciprocity_prop as a dyadic predictor. The variable takes the number of times the senator (node 1) has sponsored a bill that was cosponsored by (node 2) in the previous session 106 over a denominator of the total number of times the senator (node 1) sponsored bills in the previous session.
Below is the adjacency matrix for reciprocity between row Senators of Congress 108 and column Senators of Congress 107 (only showing senators who appear in 107 and also appear in 108 for columns).
The estimated coefficient on lreciprocity_prop is 0.329. When facing a bill today, a senator who has had a sponsorship history with the senator-sponsor is more likely to cosponsor today’s bill. (conditional on having any non-zero sponsorship history). The coefficient estimated on the binary variable for reciprocity_prop0 (if not zero then 1, if zero then 0) is -1.031.
## $`Number of Dyads`
## [1] 367884
##
## $`Number of Family 1 Blocks`
## [1] 3
##
## $`Number of Family 2 Blocks`
## [1] 4
##
## $`Percent of Observations in Each Family 1 Block`
## [1] 0.4934401 0.4019611 0.1045988
##
## $`Percent of Observations in Each Family 2 Block`
## [1] 0.3875515 0.1642387 0.0670654 0.3811444
##
## $`Blockmodel Matrix`
## 2 Group 1 2 Group 2 2 Group 3 2 Group 4
## 1 Group 1 0.09557259 0.07067136 0.07254344 0.1231705
## 1 Group 2 0.15105173 0.22678174 0.15920565 0.1811063
## 1 Group 3 0.09687505 0.08517229 0.06708569 0.1289729
##
## $`Monadic Coefficients 1`
## Coefficient Std. Error
## State 1:Group 1:(Intercept) 7.7236066 0.3920627
## State 1:Group 1:seniority -0.5293196 0.3914606
## State 1:Group 1:ideol1 3.7870669 0.4646549
## State 1:Group 1:ideol2 5.9474042 0.3934785
## State 1:Group 1:as.factor(party)Independent -0.9735740 0.3945799
## State 1:Group 1:as.factor(party)Republican 2.5808921 0.3952737
## State 1:Group 1:sexm 2.1094867 0.3946485
## State 1:Group 2:(Intercept) 3.3844594 0.3936318
## State 1:Group 2:seniority 0.2507057 0.3914932
## State 1:Group 2:ideol1 -5.8120219 0.6714526
## State 1:Group 2:ideol2 -3.7299887 0.3995444
## State 1:Group 2:as.factor(party)Independent -0.5368524 0.3863172
## State 1:Group 2:as.factor(party)Republican -4.2767497 0.3939836
## State 1:Group 2:sexm -1.2710521 0.4056372
## State 1:Group 3:(Intercept) 0.3495208 0.3952176
## State 1:Group 3:seniority 0.1593637 0.3914376
## State 1:Group 3:ideol1 -0.1101136 0.3752517
## State 1:Group 3:ideol2 -6.6417319 0.3662060
## State 1:Group 3:as.factor(party)Independent 0.0426474 0.1029513
## State 1:Group 3:as.factor(party)Republican 1.2179314 0.4138883
## State 1:Group 3:sexm -0.1055889 0.3897526
##
## $`Monadic Coefficients 2`
## Coefficient Std. Error
## State 1:Group 1:(Intercept) 5.85698598 3.02562911
## State 1:Group 1:as.factor(Major2)2 0.92888536 3.02562911
## State 1:Group 1:as.factor(Major2)3 4.00670848 3.02562911
## State 1:Group 1:as.factor(Major2)4 -4.05939559 3.02562911
## State 1:Group 1:as.factor(Major2)5 0.01825117 3.02562911
## State 1:Group 1:as.factor(Major2)6 -4.34632875 3.02562911
## State 1:Group 1:billsponsor_seniority 1.67727788 3.02562911
## State 1:Group 1:billsponsor_ideol1 0.67000786 3.02562911
## State 1:Group 1:billsponsor_ideol2 -1.53707661 3.02562911
## State 1:Group 1:as.factor(billsponsor_party)Independent -0.70202420 3.02532716
## State 1:Group 1:as.factor(billsponsor_party)Republican 2.39468270 3.02562911
## State 1:Group 1:billsponsor_sexm 0.99476943 3.02562911
## State 1:Group 2:(Intercept) 1.28121238 3.02562911
## State 1:Group 2:as.factor(Major2)2 2.81664175 3.02562911
## State 1:Group 2:as.factor(Major2)3 0.17922038 3.02562911
## State 1:Group 2:as.factor(Major2)4 0.53080101 3.02562911
## State 1:Group 2:as.factor(Major2)5 2.78826796 3.02562911
## State 1:Group 2:as.factor(Major2)6 -2.47210002 3.02562911
## State 1:Group 2:billsponsor_seniority 1.45735587 3.02562911
## State 1:Group 2:billsponsor_ideol1 -3.89375926 3.02562911
## State 1:Group 2:billsponsor_ideol2 0.65988493 3.02562911
## State 1:Group 2:as.factor(billsponsor_party)Independent -0.46520049 3.01549498
## State 1:Group 2:as.factor(billsponsor_party)Republican -4.20009290 3.02562911
## State 1:Group 2:billsponsor_sexm -0.71991762 3.02562911
## State 1:Group 3:(Intercept) -4.52086697 3.02558997
## State 1:Group 3:as.factor(Major2)2 1.15963773 3.02637837
## State 1:Group 3:as.factor(Major2)3 -3.63449759 3.67890773
## State 1:Group 3:as.factor(Major2)4 4.87977648 3.02561946
## State 1:Group 3:as.factor(Major2)5 0.91785544 3.02773726
## State 1:Group 3:as.factor(Major2)6 -0.55041891 3.15584037
## State 1:Group 3:billsponsor_seniority -0.11393602 3.02561110
## State 1:Group 3:billsponsor_ideol1 -2.35615085 3.02350451
## State 1:Group 3:billsponsor_ideol2 0.83678798 3.02440932
## State 1:Group 3:as.factor(billsponsor_party)Independent 0.86640275 0.02820261
## State 1:Group 3:as.factor(billsponsor_party)Republican -2.38041877 2.99886189
## State 1:Group 3:billsponsor_sexm -1.06344217 3.02387668
## State 1:Group 4:(Intercept) 7.13695543 3.02562070
## State 1:Group 4:as.factor(Major2)2 -2.81948174 3.02475195
## State 1:Group 4:as.factor(Major2)3 -3.78060977 3.02557457
## State 1:Group 4:as.factor(Major2)4 -4.39935119 3.03576933
## State 1:Group 4:as.factor(Major2)5 -0.63191450 3.01905838
## State 1:Group 4:as.factor(Major2)6 0.45881720 3.02538150
## State 1:Group 4:billsponsor_seniority -2.80019696 3.02562522
## State 1:Group 4:billsponsor_ideol1 0.79944765 3.02558008
## State 1:Group 4:billsponsor_ideol2 0.94504004 3.02528709
## State 1:Group 4:as.factor(billsponsor_party)Independent 0.10372312 3.02396728
## State 1:Group 4:as.factor(billsponsor_party)Republican -0.87877402 3.02496875
## State 1:Group 4:billsponsor_sexm -0.66912226 3.02493318
##
## $`Dyadic Coefficients`
## Coefficient Std. Error
## reciprocity_prop0 -1.031325 0.04990659
## lreciprocity_prop 0.328739 0.04807509
–>
–>
Degree distribution of full bipartite
| group 1 | group 2 | group 3 |
|---|---|---|
| 3.06 | 2.36 | 0.49 |
| group 1 | group 2 | group 3 | group 4 |
|---|---|---|---|
| 75.7 | 42.11 | 13.97 | 88.04 |
Bipartite graph visualization:
Bipartite sociomatrix visualization:
Bipartite graph: Splitting bills by sponsoring party
Democrat sponsored bill
Republican sponsored bill
9/21/2020 * reciprocity variable: code dummy for 0; another variable that’s log(reciprocity +1) –> change this to proportion (den total sponsored bills) (if still super skewed, below:) * reciprocity more on dyadic measurement of reciprocity – net of that, likelihood of senators cosponsoring together * change covariates and see how it affects small world network: - estimate model, create 100 replicates of network and compute the small network statistics, see how it changes * Simulate a bunch of networks, and of those networks compute small world and then - each legislator generate membership, given that membership use block model probas to generate the networks (holding covariates at meaningful level) * network~network ; impossible bc a change in the network hard to think of, so hard to focus on what shifting; so instead summarize network using a model; then think of changing of parameter of model, which changes distrib of network and use that on the network - averaging units across time – (Neil Sheppard) –> martingale trick to get variance over time even if things are dependent, use that to get standard error; so treatment is a map of a day, outcome is map of a day; then you can allow arbitrary spillover effects - network spillover: if I change the network of this congress, what is the causal effect of that on next congress (with standard errors) - SO: how is result not entirely based on model you choose? KI: in obs study still need to model treatment, so there’s modeling assumption. but the nice bit of above, subtle diff in assuming how people react to text is fn of model parameter directly (unreasonable) whereas implied
Match on Senator latent groups via largest proportion of Party (so latent group mostly Republicans, mostly Democrats, and mixed – matched labels for sessions 107-108)
Session 107 model output, Senator latent groups are
Session 108 model output, Senator latent groups are
would be helpful to have some measure of how “contentious” a bill is, as well as how “symbolic” – since likely that directly relates to how many cosponsors (right now bills tend to group into “high degree”, “mid degree”, “very low degree”)
How to compare with unipartite set up? * block model senators under bipartite and unipartite * predictive accuracy? * simulation of bipartite –> and analyze with unipartite projection
Create Table 1 from “Fast Estimation of Ideal Points with massive Data” Conjoint.pdf for imai.fas.harvard.edu/research/files/conjoint.pdf Figure 1
no. nodes in each type and no. nodes end up using – ignoring thousands of types of data;
Interpreting the dyadic coefficient lreciprocity_prop * 1% incr in reciprocity leads to 2% increase in odds of cosponsoring * probability of reciprocity: if you go from quarter time to half the time
In Song’s model * requires repeated interactions between same pair of nodes – some edges are allowed to be of different kinds * graph where he has collapsed